import request from '@/utils/request'

export default {
  //分页查询课程列表
  getCourseByCondition(current,pageSize,courseFrontVo) {
    return request({
      url: `/eduservice/CourseFront/getCourseSByCondition/${current}/${pageSize}`,
      method: 'post',
      data: courseFrontVo
    })
  },
  // 查询课程分类
  getAllSubject(){
    return request({
      url: `/eduservice/subject/getAllSubject`,
      method: 'get',
    })
  },
// 查询课程详情
  getCourseDetail(courseId){
    return request({
      url: `/eduservice/CourseFront/getCourseDetail/${courseId}`,
      method: 'get',
    })
  },
  // 查询评论列表
  getComments(current,pageSize,courseId){
    return request({
      url: `/eduservice/comment/getComments/${current}/${pageSize}/${courseId}`,
      method: 'get',
    })
  },
  // 添加评论
  saveComment(comment){
    return request({
      url: `/eduservice/comment/saveComment`,
      method: 'post',
      data: comment
    })
  }
}

